package com.jiuqi.irs.generator.form;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for tbDetailproof.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="tbDetailproofForm"
 */
public class TbCancelForm extends ActionForm {

	private java.lang.String cancelGuid = null;
	private java.lang.String orgGuid = null;
	private java.lang.String cancelState = null;
	private java.lang.String cancelYear = null;
	private java.lang.String startNumber = null;
	private java.lang.String endNumber = null;
	private java.lang.String useYear = null;
	private java.lang.String useStartNumber = null;
	private java.lang.String useEndNumber = null;
	private java.lang.String useQuantity = null;
	private java.lang.String unUsedQuantity = null;
	private java.lang.String invalidQuantity = null;
	private java.math.BigDecimal cutSum;
	private java.math.BigDecimal gatherSum;
	private java.lang.String handleTime = null;
	private java.lang.String handlePerson = null;
	private java.lang.String reserved1 = null;
	private java.lang.String reserved2 = null;
	private java.lang.String reserved3 = null;

	/**
	 * Standard constructor.
	 */
	public TbCancelForm() {
	}

	

	public java.lang.String getCancelGuid() {
		return cancelGuid;
	}



	public void setCancelGuid(java.lang.String cancelGuid) {
		this.cancelGuid = cancelGuid;
	}



	public java.lang.String getOrgGuid() {
		return orgGuid;
	}



	public void setOrgGuid(java.lang.String orgGuid) {
		this.orgGuid = orgGuid;
	}



	public java.lang.String getCancelState() {
		return cancelState;
	}



	public void setCancelState(java.lang.String cancelState) {
		this.cancelState = cancelState;
	}



	public java.lang.String getCancelYear() {
		return cancelYear;
	}



	public void setCancelYear(java.lang.String cancelYear) {
		this.cancelYear = cancelYear;
	}



	public java.lang.String getStartNumber() {
		return startNumber;
	}



	public void setStartNumber(java.lang.String startNumber) {
		this.startNumber = startNumber;
	}



	public java.lang.String getEndNumber() {
		return endNumber;
	}



	public void setEndNumber(java.lang.String endNumber) {
		this.endNumber = endNumber;
	}



	public java.lang.String getUseYear() {
		return useYear;
	}



	public void setUseYear(java.lang.String useYear) {
		this.useYear = useYear;
	}



	public java.lang.String getUseStartNumber() {
		return useStartNumber;
	}



	public void setUseStartNumber(java.lang.String useStartNumber) {
		this.useStartNumber = useStartNumber;
	}



	public java.lang.String getUseEndNumber() {
		return useEndNumber;
	}



	public void setUseEndNumber(java.lang.String useEndNumber) {
		this.useEndNumber = useEndNumber;
	}



	public java.lang.String getUseQuantity() {
		return useQuantity;
	}



	public void setUseQuantity(java.lang.String useQuantity) {
		this.useQuantity = useQuantity;
	}



	public java.lang.String getUnUsedQuantity() {
		return unUsedQuantity;
	}



	public void setUnUsedQuantity(java.lang.String unUsedQuantity) {
		this.unUsedQuantity = unUsedQuantity;
	}



	public java.lang.String getInvalidQuantity() {
		return invalidQuantity;
	}



	public void setInvalidQuantity(java.lang.String invalidQuantity) {
		this.invalidQuantity = invalidQuantity;
	}



	public java.math.BigDecimal getCutSum() {
		return cutSum;
	}



	public void setCutSum(java.math.BigDecimal cutSum) {
		this.cutSum = cutSum;
	}



	public java.math.BigDecimal getGatherSum() {
		return gatherSum;
	}



	public void setGatherSum(java.math.BigDecimal gatherSum) {
		this.gatherSum = gatherSum;
	}



	public java.lang.String getHandleTime() {
		return handleTime;
	}



	public void setHandleTime(java.lang.String handleTime) {
		this.handleTime = handleTime;
	}



	public java.lang.String getHandlePerson() {
		return handlePerson;
	}



	public void setHandlePerson(java.lang.String handlePerson) {
		this.handlePerson = handlePerson;
	}



	public java.lang.String getReserved1() {
		return reserved1;
	}



	public void setReserved1(java.lang.String reserved1) {
		this.reserved1 = reserved1;
	}



	public java.lang.String getReserved2() {
		return reserved2;
	}



	public void setReserved2(java.lang.String reserved2) {
		this.reserved2 = reserved2;
	}



	public java.lang.String getReserved3() {
		return reserved3;
	}



	public void setReserved3(java.lang.String reserved3) {
		this.reserved3 = reserved3;
	}



	/**
	 * Validate the properties that have been set from this HTTP request,
	 * and return an <code>ActionErrors</code> object that encapsulates any
	 * validation errors that have been found.  If no errors are found, return
	 * <code>null</code> or an <code>ActionErrors</code> object with no
	 * recorded error messages.
	 *
	 * @param mapping The mapping used to select this instance
	 * @param request The servlet request we are processing
	 */
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		ActionErrors errors = new ActionErrors();
		// test for nullity
		if (getCancelGuid() == null) {
			errors.add("cancelGuid", new ActionError(
					"error.cancelGuid.required"));
		}
		// TODO test format/data
		return errors;
	}
}
